//
//  CarHourAnnotation.m
//  Exam12-1
//
//  Created by 孙晓晔 on 2017/4/19.
//  Copyright © 2017年 孙晓晔. All rights reserved.
//

#import "CarHourAnnotation.h"

@implementation CarHourAnnotation

@synthesize coordinate;
@synthesize title, subtitle;

-(instancetype)initWithCoordinate2D:(CLLocationCoordinate2D)coordinate2D {
    self = [super init];
    
    if (self) {
        coordinate = coordinate2D;
    }
    
    return self;
}

-(void)setCar:(Car *)car {
    _car = car;
    
    self.coordinate = CLLocationCoordinate2DMake(car.latitude, car.longitude);
}

-(CLLocationCoordinate2D)coordinate {
    return coordinate;
}

-(NSString*)title {
    return title;
}

-(NSString*)subtitle {
    return subtitle;
}

@end
